﻿using System;
using System.Collections.Generic;
using BrainTechLLC.Silverlight.InputControls;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace BrainTechLLC.Silverlight.ClientApplication
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            DataAccess.SendTestMessage();
            //TreeViewItem tvi = new TreeViewItem()
            //{
            //     Header = "Testing 1 2 3"
            //};
            //TreeViewItem tviSub1 = new TreeViewItem()
            //{
            //     Header = "Testing Subitem 1 2 3"
            //};
            //tvi.Items.Add(tviSub1);
            //tv.Items.Add(tvi);            
            
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            DataAccess.Client.SaveWorldAsync(DataAccess.AssignedUniqueId);
        }

        private void QuickMasterControlPanel_WantUpload(object sender, EventArgs e)
        {
            wc2.Visibility = Visibility.Visible;
        }

        private void WindowContainer_CloseWindow(object sender, EventArgs e)
        {
            wc2.Visibility = Visibility.Collapsed;
        }

        private void UserControl_KeyDown(object sender, KeyEventArgs e)
        {
            if (!mainHUD.HasFocus && !FocusHandler.InTextField)
                mainHUD.SetFocus();
        }

        private void UserControl_KeyUp(object sender, KeyEventArgs e)
        {

        }
    }
}
